"""
@Author : 合肥一元数智教育科技有限公司
@Date :  2025/11/1 9:55
@Description : 
xxx.csv 格式文件操作
"""
import csv

# 读取数据
with open('users.csv', 'r', encoding='utf-8') as f:
    reader = csv.reader(f)
    for row in reader:
        print(row, type(row))

new_users =[
['user1', '333333', '男', 18],
['user2', '333333', '男', 18]
]

with open('users.csv', 'a', encoding='utf-8',newline='\n') as f:
    writer = csv.writer(f)
    # 写出数据 一行
    # writer.writerow(new_user)
    # 写出多行
    writer.writerows(new_users)
